{% extends myBundleName ~ ':Layout:layout.html.twig' %}

{% block title %}{{ myTitlePrefix }} Assign {% endblock %}

{% block content %}
<form method="post" action="{{ path('zayso_core_schedule_referee_assign', { 'id': game.id }) }}" {{ form_enctype(form) }}>
<table border="2" class="form_table" width="600">
<input type="hidden" name="gameId" value="{{ game.id }}" />
    <tr><th colspan="2">Referee Assigment</th></tr>
    <tr>
        <td style="width: 150px;">Game Number</td><td>{{ game.num }}</td>
    </tr><tr>
        <td>Date</td><td>{{ game_date(game.date) }}</td>
    </tr><tr>
        <td>Time</td><td>{{ game_time(game.time) }}</td>
    </tr><tr>
        <td>Field</td><td>{{ game.fieldDesc }}</td>
    </tr><tr>
        <td>Home Team</td><td>{{ game.homeTeam.team.desc }}</td>
    </tr><tr>
        <td>Away Team</td><td>{{ game.awayTeam.team.desc }}</td>
    </tr>
    <tr><td colspan="2"></td></tr>
    <tr><td colspan="2"><table border="1" style="margin: 0px;">
    <tr>
         <td style="width: 100px;">Position</td>
         <td style="width: 200px;">Status</td>
         <td style="width: 300px;">Official</td>
    </tr>
    {% for eventPerson in form.persons %}
        {{ form_widget(eventPerson.type) }}
        <tr>
            <td>{{ form_widget(eventPerson.typeDesc) }}</td>
            <td>{{ form_widget(eventPerson.statex)   }}</td>
            <td>{{ form_widget(eventPerson.personIdx)}}</td>
        </tr>
    {% endfor %}
    </table></td></tr>
    <tr>
        <td><a href="{{ path('zayso_core_schedule_referee_list') }}#ref-sched-{{game.num}}">Referee Schedule</a></td>
        <td align="right"><input type="submit" name="refAssignSubmit" value="Sign Up" /></td>
    </tr>
</table>
{{ form_rest(form) }}        
</form>
<h3>Instructions</h3>
<p>
    You must be signed on in order to sign up for a game.  Your user information should be shown along the very top of the page.
</p>
<p>
    Sign up for a game by picking your name then pressing the Sign Up button.
    The status will change to Assignment Requested.  
    Your Regional Referee Administrator(RRA) may or may not review the assignments and approve them.
    As long as your name is on the schedule then consider the games yours.
<p>
    Remove yourself from an assignment by selecting Request Removal from the status column then pressing Sign Up.
    If your assignment has not already been approved then you will be removed.
    If your assignment has already been approved then the RRA will be notified of your request..
</p>
<h3>Guidelines</h3>
<p>
    We operate under "trust but verify".  
    The system currently has very few blocks enabled however we will be reviewing all assignment requests carefully.
    Please avoid any appearance of conflict of interest.
    The lead assignor (i.e. RRA) has the final say on all assignments.
</p>
{% endblock %}
